<template>
	<!-- 立即购买的按钮 -->
	<view class="bottom  center" @click="clickHandler">
		<text class="bottom-btn">{{btnText}}</text>
	</view>
</template>

<script>
	export default{
		props:{
			btnText:{
				type:String,
				default:'立即购买'
			},
			courseId:[String,Number]   // 可接收字符串类型 也可接收数字类型
		},
		methods:{
			clickHandler(){
				console.log('触发按钮')
				
				this.$emit('clickBottom')
			}
		}
	}
	
</script>

<style  lang="scss">
	.bottom{
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #FFFFFF;
		height: 100rpx;
		border-bottom: $xg-underline;
		.bottom-btn{   //手机适配的是  750 
			width: 700rpx;
			background-color: #345DC2;
			text-align: center;
			font-size: 35rpx;
			color: #FFFFFF;
			border-radius: 50rpx;
			line-height: 80rpx;
		}
	}
	
</style>
